package com.ricchieri.dao;

import java.util.List;

import org.hibernate.Criteria;

import com.ricchieri.dao.interf.IDocumentationDao;
import com.ricchieri.filter.BasicFilter;
import com.ricchieri.model.Documentation;

public class DocumentationDao extends GenericDao implements IDocumentationDao {
	private static final long serialVersionUID = -8622011446286765627L;

	@Override
	@SuppressWarnings("unchecked")
	public List<Documentation> getAllDocumentation(BasicFilter filter) {
		Criteria criteria = criteriaAllDocumentation(filter);
		
		return criteria.list();
	}
	
	private Criteria criteriaAllDocumentation(BasicFilter filter) {
		return super.criteriaAllBasic(filter, Documentation.class);
	}	
	
	@Override
	protected String getTableName() {
		return "documentation";
	}
}
